_ssss_rrrr______ssss_tttt_aaaa_rrrr_tttt, _ssss_rrrr______mmmm_aaaa_xxxx_llll_eeee_nnnn_gggg_tttt_hhhh, _ssss_rrrr______vvvv_llll_eeee_nnnn_gggg_tttt_hhhh, and _ssss_rrrr______llll_eeee_nnnn_gggg_tttt_hhhh are specified in 512-
byte blocks. _ssss_rrrr______llll_eeee_nnnn_gggg_tttt_hhhh specifies the number of blocks of the specified
resource that should be used for new swap area. It must be less than or
equal to the size of the resource (e.g. file size or partition size). If
a -1 is specified, _ssss_rrrr______llll_eeee_nnnn_gggg_tttt_hhhh, _ssss_rrrr______mmmm_aaaa_xxxx_llll_eeee_nnnn_gggg_tttt_hhhh, and _ssss_rrrr______vvvv_llll_eeee_nnnn_gggg_tttt_hhhh are all set to
the size of the resource. _ssss_rrrr______mmmm_aaaa_xxxx_llll_eeee_nnnn_gggg_tttt_hhhh specifies the number of blocks
the specified resource should, if required, be grown to. This option is
currently unsupported, and _ssss_rrrr______mmmm_aaaa_xxxx_llll_eeee_nnnn_gggg_tttt_hhhh should always be set equal to
_ssss_rrrr______llll_eeee_nnnn_gggg_tttt_hhhh. _ssss_rrrr______vvvv_llll_eeee_nnnn_gggg_tttt_hhhh specifies the number of blocks the system should
assume the new swap area can handle. Normally, this should be equal to
_ssss_rrrr______llll_eeee_nnnn_gggg_tttt_hhhh - meaning that the system will never over commit its memory
resources. If _ssss_rrrr______vvvv_llll_eeee_nnnn_gggg_tttt_hhhh is set larger than _ssss_rrrr______llll_eeee_nnnn_gggg_tttt_hhhh, then the system
believes that it has more swap space than it really does. As long as no
process actually requires that space, there is no problem. This permits
very large applications that wish to _f_o_r_k(2) but have no intention of
creating two large processes, to do so without requiring a lot of swap
space that is really not needed. It also permits applications that have
sparse data to effectively run on machines with small swap spaces.
Because the system can in fact over commit its memory resources,
deadlocks can result where there is no more memory and no more swap
space. These deadlocks are detected by the system and an appropriate
process is killed that will permit the system to continue operating.
_ssss_rrrr______pppp_rrrr_iiii set the priority of the new swap area. Swap areas with a higher
priority are allocated from first. If _ssss_rrrr______pppp_rrrr_iiii is set to -1 the system
will assign the priority based on the type of swap resource. Highest
priority (0) is the default for block devices. Priority 2 for local file
system files, and priority 4 for nfs mounted files.
The _ssss_rrrr______ssss_tttt_aaaa_rrrr_tttt value will be rounded up to the next multiple of the system
swap page size (4096 bytes or 16384 depending on the return value of the
_g_e_t_p_a_g_e_s_i_z_e(2) system call). The _ssss_rrrr______llll_eeee_nnnn_gggg_tttt_hhhh, _ssss_rrrr______vvvv_llll_eeee_nnnn_gggg_tttt_hhhh, and _ssss_rrrr______mmmm_aaaa_xxxx_llll_eeee_nnnn_gggg_tttt_hhhh
values will be rounded down to the next multiple of the system swap page
size.
When _SSSS_CCCC______AAAA_DDDD_DDDD or _SSSS_CCCC______RRRR_EEEE_MMMM_OOOO_VVVV_EEEE is specified, _a_r_g is a pointer to a _ssss_wwww_aaaa_pppp_rrrr_eeee_ssss
_SSSS_CCCC______LLLL_IIII_SSSS_TTTT causes _ssss_wwww_aaaa_pppp_cccc_tttt_llll to return at most _ssss_wwww_tttt______nnnn entries. The return value
of _ssss_wwww_aaaa_pppp_cccc_tttt_llll is the number actually returned. The _SSSS_TTTT______IIII_NNNN_DDDD_EEEE_LLLL bit is turned
on in _ssss_tttt_eeee______ffff_llll_aaaa_gggg_ssss if the swap file is in the process of being deleted. The
_SSSS_TTTT______SSSS_TTTT_AAAA_LLLL_EEEE bit is turned on in _ssss_tttt_eeee______ffff_llll_aaaa_gggg_ssss if the swap file is on an NFS
mounted file system, and the file on the server was removed. No further
allocations will be made from a swap resource that has this bit set. The
_SSSS_TTTT______LLLL_OOOO_CCCC_AAAA_LLLL bit is turned on in _ssss_tttt_eeee______ffff_llll_aaaa_gggg_ssss if the swap resource resides on a
local disk. The _SSSS_TTTT______IIII_OOOO_EEEE_RRRR_RRRR bit is turned on in _ssss_tttt_eeee______ffff_llll_aaaa_gggg_ssss if any errors
have occurred when reading or writing the swap resource. Allocations
will still be satisfied from swap resources with this bit set. The
_SSSS_TTTT______EEEE_AAAA_CCCC_CCCC_EEEE_SSSS bit is turned on in _ssss_tttt_eeee______ffff_llll_aaaa_gggg_ssss if a permission error occurs when
attempting to write to the swap resource. This occurs most often when
user id 0 does not have the appropriate privileges on an NFS mounted file
system. No further allocations will be made from a swap resource that
has this bit set. The _SSSS_TTTT______BBBB_OOOO_OOOO_TTTT_SSSS_WWWW_AAAA_PPPP bit is turned on in _ssss_tttt_eeee______ffff_llll_aaaa_gggg_ssss if this
swap device was the initial swap device configured at boot time.
When _SSSS_CCCC______GGGG_EEEE_TTTT_NNNN_SSSS_WWWW_PPPP is specified, _ssss_wwww_aaaa_pppp_cccc_tttt_llll returns as its value the number of
swap resources in use. _a_r_g is ignored for this operation.
_SSSS_CCCC______LLLL_RRRR_EEEE_MMMM_OOOO_VVVV_EEEE causes _ssss_wwww_aaaa_pppp_cccc_tttt_llll removes the logical swap resource specified by
_a_r_g.
When _SSSS_CCCC______GGGG_EEEE_TTTT_FFFF_RRRR_EEEE_EEEE_SSSS_WWWW_AAAA_PPPP is specified, _ssss_wwww_aaaa_pppp_cccc_tttt_llll copies the number of currently
free swap blocks (512 bytes) to the address given by _aaaa_rrrr_gggg. This is the
sum of each swap area's _ssss_tttt_eeee______ffff_rrrr_eeee_eeee value, converted to 512 byte blocks.
When _SSSS_CCCC______GGGG_EEEE_TTTT_SSSS_WWWW_AAAA_PPPP_VVVV_IIII_RRRR_TTTT is specified, _ssss_wwww_aaaa_pppp_cccc_tttt_llll copies the total number of
virtual swap blocks (512 bytes) to the address given by _aaaa_rrrr_gggg. This is the
sum of each swap area's _ssss_tttt_eeee______vvvv_pppp_aaaa_gggg_eeee_ssss value, converted to 512 byte blocks.
When _SSSS_CCCC______GGGG_EEEE_TTTT_RRRR_EEEE_SSSS_VVVV_SSSS_WWWW_AAAA_PPPP is specified, _ssss_wwww_aaaa_pppp_cccc_tttt_llll copies the number of logical
swap blocks (512 bytes) that have been reserved by all existing processes
to the address given by _aaaa_rrrr_gggg. When this value is greater than the value
returned by _SSSS_CCCC______GGGG_EEEE_TTTT_LLLL_SSSS_WWWW_AAAA_PPPP_TTTT_OOOO_TTTT minus the value returned by _SSSS_CCCC______SSSS_WWWW_AAAA_PPPP_MMMM_AAAA_XXXX, there
is the potential for deadlock if every process suddenly requires all that
it has reserved.
When _SSSS_CCCC______GGGG_EEEE_TTTT_LLLL_SSSS_WWWW_AAAA_PPPP_TTTT_OOOO_TTTT is specified, _ssss_wwww_aaaa_pppp_cccc_tttt_llll copies the current number of
logical swap blocks (512 bytes) to the address given by _aaaa_rrrr_gggg. This is
value is the sum of the amount of physical memory potentially available
for processes plus the number of virtual swap blocks plus the number of
physical swap blocks.
When _SSSS_CCCC______GGGG_EEEE_TTTT_SSSS_WWWW_AAAA_PPPP_TTTT_OOOO_TTTT is specified, _ssss_wwww_aaaa_pppp_cccc_tttt_llll copies the current number of
physical swap blocks (512 bytes) to the address given by _aaaa_rrrr_gggg. This is
the sum of each swap area's _ssss_tttt_eeee______pppp_aaaa_gggg_eeee_ssss value, converted to 512 byte
blocks.
When _SSSS_CCCC______GGGG_EEEE_TTTT_SSSS_WWWW_AAAA_PPPP_MMMM_AAAA_XXXX is specified, _ssss_wwww_aaaa_pppp_cccc_tttt_llll copies the maximum number of
swap blocks (512 bytes) to the address given by _aaaa_rrrr_gggg. This is the sum of
each swap area's _ssss_tttt_eeee______mmmm_aaaa_xxxx_pppp_aaaa_gggg_eeee_ssss value, converted to 512 byte blocks. Since
growable swap areas is not yet supported this value will always be the
same as that returned by _SSSS_CCCC______GGGG_EEEE_TTTT_SSSS_WWWW_AAAA_PPPP_TTTT_OOOO_TTTT.
When specifying _SSSS_CCCC______GGGG_EEEE_TTTT_FFFF_RRRR_EEEE_EEEE_SSSS_WWWW_AAAA_PPPP, _SSSS_CCCC______GGGG_EEEE_TTTT_SSSS_WWWW_AAAA_PPPP_VVVV_IIII_RRRR_TTTT, _SSSS_CCCC______GGGG_EEEE_TTTT_RRRR_EEEE_SSSS_VVVV_SSSS_WWWW_AAAA_PPPP,
_SSSS_CCCC______GGGG_EEEE_TTTT_LLLL_SSSS_WWWW_AAAA_PPPP_TTTT_OOOO_TTTT, _SSSS_CCCC______GGGG_EEEE_TTTT_SSSS_WWWW_AAAA_PPPP_TTTT_OOOO_TTTT, or _SSSS_CCCC______GGGG_EEEE_TTTT_SSSS_WWWW_AAAA_PPPP_MMMM_AAAA_XXXX, _aaaa_rrrr_gggg should be a pointer
to a variable of type _o_f_f__t.
The _SSSS_CCCC______SSSS_GGGG_IIII_AAAA_DDDD_DDDD, _SSSS_CCCC______AAAA_DDDD_DDDD, and _SSSS_CCCC______RRRR_EEEE_MMMM_OOOO_VVVV_EEEE functions will fail if the calling
process does not have appropriate privilege.
RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
Upon successful completion, the function _ssss_wwww_aaaa_pppp_cccc_tttt_llll returns a value of _0000 for
_SSSS_CCCC______GGGG_EEEE_TTTT_FFFF_RRRR_EEEE_EEEE_SSSS_WWWW_AAAA_PPPP, _SSSS_CCCC______GGGG_EEEE_TTTT_SSSS_WWWW_AAAA_PPPP_TTTT_OOOO_TTTT, _SSSS_CCCC______GGGG_EEEE_TTTT_LLLL_SSSS_WWWW_AAAA_PPPP_TTTT_OOOO_TTTT, or _SSSS_CCCC______RRRR_EEEE_MMMM_OOOO_VVVV_EEEE, the number
of _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_wwww_aaaa_pppp_eeee_nnnn_tttt entries actually returned for _SSSS_CCCC______LLLL_IIII_SSSS_TTTT, or the number of
swap resources in use for _SSSS_CCCC______GGGG_EEEE_TTTT_NNNN_SSSS_WWWW_PPPP. Upon failure, the function _ssss_wwww_aaaa_pppp_cccc_tttt_llll
returns a value of _----_1111 and sets _eeee_rrrr_rrrr_nnnn_oooo to indicate an error.
EEEERRRRRRRROOOORRRRSSSS
Under the following conditions, the function _ssss_wwww_aaaa_pppp_cccc_tttt_llll fails and sets _eeee_rrrr_rrrr_nnnn_oooo
to:
_EEEE_EEEE_XXXX_IIII_SSSS_TTTT Part of the range specified by _ssss_rrrr______ssss_tttt_aaaa_rrrr_tttt and _ssss_rrrr______llll_eeee_nnnn_gggg_tttt_hhhh is
already being used for swapping on the specified resource
(_SSSS_CCCC______AAAA_DDDD_DDDD or _SSSS_CCCC______SSSS_GGGG_IIII_AAAA_DDDD_DDDD).
_EEEE_FFFF_AAAA_UUUU_LLLL_TTTT _a_r_g, _ssss_rrrr______nnnn_aaaa_mmmm_eeee, or _ssss_tttt_eeee______pppp_aaaa_tttt_hhhh points outside the allocated
address space.
_EEEE_IIII_NNNN_VVVV_AAAA_LLLL _ssss_rrrr______llll_eeee_nnnn_gggg_tttt_hhhh is not -1 and either _ssss_rrrr______mmmm_aaaa_xxxx_llll_eeee_nnnn_gggg_tttt_hhhh is not equal to
_ssss_rrrr______llll_eeee_nnnn_gggg_tttt_hhhh, or _ssss_rrrr______vvvv_llll_eeee_nnnn_gggg_tttt_hhhh is less than either _ssss_rrrr______llll_eeee_nnnn_gggg_tttt_hhhh or
is less than one page (_SSSS_CCCC______AAAA_DDDD_DDDD or _SSSS_CCCC______SSSS_GGGG_IIII_AAAA_DDDD_DDDD).
_EEEE_IIII_SSSS_DDDD_IIII_RRRR The path specified for _SSSS_CCCC______AAAA_DDDD_DDDD or _SSSS_CCCC______SSSS_GGGG_IIII_AAAA_DDDD_DDDD is a directory.
_EEEE_LLLL_OOOO_OOOO_PPPP Too many symbolic links were encountered in translating the
pathname provided to _SSSS_CCCC______AAAA_DDDD_DDDD, _SSSS_CCCC______SSSS_GGGG_IIII_AAAA_DDDD_DDDD, or _SSSS_CCCC______RRRR_EEEE_MMMM_OOOO_VVVV_EEEE .
_EEEE_NNNN_AAAA_MMMM_EEEE_TTTT_OOOO_OOOO_LLLL_OOOO_NNNN_GGGGThe length of a component of the path specified for _SSSS_CCCC______AAAA_DDDD_DDDD,
_SSSS_CCCC______SSSS_GGGG_IIII_AAAA_DDDD_DDDD, or _SSSS_CCCC______RRRR_EEEE_MMMM_OOOO_VVVV_EEEE exceeds _{{{{_NNNN_AAAA_MMMM_EEEE______MMMM_AAAA_XXXX_}}}} characters or the
length of the path exceeds _{{{{_PPPP_AAAA_TTTT_HHHH______MMMM_AAAA_XXXX_}}}} characters and
_{{{{______PPPP_OOOO_SSSS_IIII_XXXX______NNNN_OOOO______TTTT_RRRR_UUUU_NNNN_CCCC_}}}} is in effect.
_EEEE_NNNN_OOOO_EEEE_NNNN_TTTT The pathname specified for _SSSS_CCCC______AAAA_DDDD_DDDD, _SSSS_CCCC______SSSS_GGGG_IIII_AAAA_DDDD_DDDD, or _SSSS_CCCC______RRRR_EEEE_MMMM_OOOO_VVVV_EEEE
does not exist.
_EEEE_NNNN_OOOO_MMMM_EEEE_MMMM An insufficient number of _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_wwww_aaaa_pppp_eeee_nnnn_tttt structures were
provided to _SSSS_CCCC______LLLL_IIII_SSSS_TTTT, or there were insufficient system
storage resources available during an _SSSS_CCCC______AAAA_DDDD_DDDD, _SSSS_CCCC______SSSS_GGGG_IIII_AAAA_DDDD_DDDD, or
_SSSS_CCCC______RRRR_EEEE_MMMM_OOOO_VVVV_EEEE, or the system would not have enough swap space
after an _SSSS_CCCC______RRRR_EEEE_MMMM_OOOO_VVVV_EEEE.
_EEEE_NNNN_OOOO_SSSS_YYYY_SSSS The pathname specified for _SSSS_CCCC______AAAA_DDDD_DDDD, _SSSS_CCCC______SSSS_GGGG_IIII_AAAA_DDDD_DDDD, or _SSSS_CCCC______RRRR_EEEE_MMMM_OOOO_VVVV_EEEE is
not a file or block special device. The file system on which
pathname resides does not permit mapping or swapping.
_EEEE_NNNN_OOOO_TTTT_DDDD_IIII_RRRR Pathname provided to _SSSS_CCCC______AAAA_DDDD_DDDD, _SSSS_CCCC______SSSS_GGGG_IIII_AAAA_DDDD_DDDD, or _SSSS_CCCC______RRRR_EEEE_MMMM_OOOO_VVVV_EEEE
contained a component in the path prefix that was not a
directory.
_EEEE_PPPP_EEEE_RRRR_MMMM The process does not have appropriate privilege.
_EEEE_RRRR_OOOO_FFFF_SSSS The pathname specified for _SSSS_CCCC______AAAA_DDDD_DDDD or _SSSS_CCCC______SSSS_GGGG_IIII_AAAA_DDDD_DDDD is a read-only